package com.syncomponents.xml;

import org.apache.commons.lang3.StringUtils;

/**
 * xml 工具类
 * 
 * @author sunkey
 * @date Jan 24, 2015
 */
public class XmlUtils {

    public static String unCDATA(String content) {
        if (StringUtils.isBlank(content)) {
            return "";
        }
        if(!content.startsWith("<![CDATA[")){
            return content;
        }
        return content.replaceAll("<!\\[CDATA\\[", "").replaceAll("]]>", "").trim();
    }
}
